package com.feign.client;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.service.base.ResponseResult;
import com.service.bean.DeviceType;

@FeignClient(name = "SERVICE-ZUUL")
public interface DeviceTypeService {
	
	@RequestMapping(value = "/api-device/getTypeList?token=token", method = RequestMethod.POST)
	ResponseResult getPage(@RequestBody DeviceType deviceType,
			@RequestParam("pageNumber") Integer pageNumber,
			@RequestParam("pageSize") Integer pageSize);
	
	@RequestMapping(value = "/api-device/insertType?token=token", method = RequestMethod.POST)
	int insert(@RequestBody DeviceType deviceType);

	@RequestMapping(value = "/api-device/delType?token=token", method = RequestMethod.POST)
	int delete(@RequestBody DeviceType deviceType);
	
	@RequestMapping(value = "/api-device/getType?token=token", method = RequestMethod.POST)
	DeviceType getDeviceType(@RequestParam("deviceTypeId")Integer deviceTypeId);

	@RequestMapping(value = "/api-device/updateType?token=token", method = RequestMethod.POST)
	int update(@RequestBody DeviceType deviceType);
	
	@RequestMapping(value = "/api-device/getDeviceTypeList?token=token", method = RequestMethod.POST)
	List<DeviceType> getDeviceTypeList();
}
